<template>
  <Header class="header">
    <div slot="left" class="header-left" @click.stop="back"></div>
    <p slot="center" class="header-title">{{ title }}</p>
    <div slot="right" class="header-right"></div>
  </Header>
</template>

<script>
import Header from '../../components/Header'
export default {
  name: "DetailHeader",
  data() {
    return {
    }
  },
  components:{
    Header
  },
  methods: {
    back() {
      this.$router.go(-1); //返回上一层
    }
  },
  props: {
    title: {
      type: String,  //类型
      default: '',   //默认值
      required: true //是否是必要的
    }
  }
}
</script>

<style scoped lang="scss">
@import "../../assets/css/variable";
@import "../../assets/css/mixin";

.header {
  position: relative;
  z-index:99;
  .header-left {
    @include bg_img("../../assets/images/back")
  }

  .header-right {
    @include bg_img("../../assets/images/more")
  }

  .header-title {
    color: white;
    font-weight: bold;
    @include font_size($font_medium);
    @include no-wrap();
  }
}
</style>
